package com.huawei.demo;

import users.User;

/**
 * @program: untitled2
 * @description: 人类玩家
 * @author: Tan
 * @create: 2022-04-27 10:08
 **/
public class Person extends User {
    private int number;
    private Integer hand;
    public final int LIFE = 5;

    public Person() {
        super();
    }

    public Person(String ip, String name, Integer hand) {
        super(ip);
        this.hand = hand;
    }

    public Integer getHand() {
        return hand;
    }

    public void setHand(Integer hand) {
        this.hand = hand;
    }

    public void display(){
        super.say();
        System.out.println(ip);
        super.number = 1;
        run();
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "Person{" +
                "number=" + number +
                ", hand=" + hand +
                ", number=" + number +
                ", ip='" + ip + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
